/**
 * @auther harfe
 * @date 2021/12/22 20:17
 */
public class TreeDeep {
    public int maxDepth(TreeNode root) {
        int depth = 0;
        if (root == null) {
            return 0;
        }
        else {
            depth = Math.max(maxDepth(root.left),maxDepth(root.right)) + 1;
        }
        return depth;
    }
}
